import request from '@/utils/request'

// 查询积分兑换商品列表
export function listCommodityOrder(query) {
  return request({
    url: '/commodityOrder/list',
    method: 'get',
    params: query
  })
}

// 查询积分兑换商品详细
export function getCommodityOrder(id) {
  return request({
    url: '/commodityOrder/' + id,
    method: 'get'
  })
}

// 新增积分兑换商品

export function addCommodityOrder(data) {
  return request({
    url: '/commodityOrder',
    method: 'post',
    data: data
  })
}

// 修改积分兑换商品

export function updateCommodityOrder(data) {
  return request({
    url: '/commodityOrder',
    method: 'put',
    data: data
  })
}

// 删除积分兑换商品

export function delCommodityOrder(id) {
  return request({
    url: '/commodityOrder/' + id,
    method: 'delete'
  })
}

// 导出积分兑换商品

export function exportCommodityOrder(query) {
  return request({
    url: '/commodityOrder/export',
    method: 'get',
    params: query
  })
}
